home *** CD-ROM | disk | FTP | other *** search
/ Resource for Source: C/C++ / Resource for Source - C-C++.iso / misc_src / knowhow4 / nret.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-01  |  217 b   |  15 lines

  1. #include "nret.h"
  2.  
  3. int nRet(char* string)
  4.     {
  5.     char* str = string;
  6.     int j = 0;
  7.     for(int i = 0; str[i]; i++)
  8.     {
  9.     if(str[i] == '\n')
  10.         j++;
  11.     }
  12.     return j;
  13.     }
  14. ///////////////////////////
  15.